package ua.epam.classloaderlab;

public class Demo {
	public static void main(String[] args) throws Exception {
		System.out.println("You can edit TestModule source file");
		System.out.println("and it will be got dynamically.");
		while (true) {
			DynamicClassLoader loader = new DynamicClassLoader(Demo.class.getClassLoader());
			Class<?> clazz = Class.forName("ua.epam.classloaderlab.TestModule", true, loader);
			System.out.println(clazz.newInstance());
			Thread.sleep(1500);
		}
	}
}